.append-bottom-10
  .pull-right
    .pull-left
      - if current_user
        .hidden-xs.pull-left
          = link_to namespace_project_issues_path(@project.namespace, @project, :atom, { private_token: current_user.private_token }), class: 'btn append-right-10' do
            %i.fa.fa-rss

      = form_tag namespace_project_issues_path(@project.namespace, @project), method: :get, id: "issue_search_form", class: 'pull-left issue-search-form'  do
        .append-right-10.hidden-xs.hidden-sm
          = search_field_tag :issue_search, params[:issue_search], { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input input-mn-300' }
          = hidden_field_tag :state, params['state']
          = hidden_field_tag :scope, params['scope']
          = hidden_field_tag :assignee_id, params['assignee_id']
          = hidden_field_tag :milestone_id, params['milestone_id']
          = hidden_field_tag :label_id, params['label_id']

    - if can? current_user, :write_issue, @project
      = link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-new pull-left", title: "New Issue", id: "new_issue_link" do
        %i.fa.fa-plus
        New Issue

  = render 'shared/issuable_filter'

  .clearfix
    .issues_bulk_update.hide
      = form_tag bulk_update_namespace_project_issues_path(@project.namespace, @project), method: :post  do
        = select_tag('update[state_event]', options_for_select([['Open', 'reopen'], ['Closed', 'close']]), prompt: "Status")
        = project_users_select_tag('update[assignee_id]', placeholder: 'Assignee')
        = select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone")
        = hidden_field_tag 'update[issues_ids]', []
        = hidden_field_tag :state_event, params[:state_event]
        = button_tag "Update issues", class: "btn update_selected_issues btn-save"

.issues-holder
  = render "issues"
